package com.sanjiahantang.youjiaclient.module.evaluate.views.impl;

import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.ListView;
import android.widget.TextView;

import com.sanjiahantang.uilibrary.adapter.listview.QuickAdapter;
import com.sanjiahantang.youjiaclient.R;
import com.sanjiahantang.youjiaclient.base.BaseMvpActivity;
import com.sanjiahantang.youjiaclient.base.BaseMvpPresenter;
import com.sanjiahantang.youjiaclient.module.evaluate.presenters.MeEvaluatePresenter;
import com.sanjiahantang.youjiaclient.module.evaluate.presenters.StoreEvaluatePresenter;
import com.sanjiahantang.youjiaclient.module.evaluate.views.MeEvaluateView;
import com.sanjiahantang.youjiaclient.module.evaluate.views.StoreEvaluateView;

import net.lucode.hackware.magicindicator.buildins.commonnavigator.CommonNavigator;

import java.util.List;

/**
 * Created by yan on 2018/1/4.
 */

public class EvaluationtStoreActivity extends BaseMvpActivity<StoreEvaluateView, StoreEvaluatePresenter>
        implements StoreEvaluateView, View.OnClickListener, StoreEvaluateView.OnListLoadListener {

    private ListView listView;

    @Override
    public StoreEvaluatePresenter initPresenter() {
        return new StoreEvaluatePresenter();
    }

    @Override
    public void initView() {
        setContentView(R.layout.activity_store_evaluate);
        listView = (ListView) this.findViewById(R.id.listView);
        this.findViewById(R.id.fl_Left).setOnClickListener(this);
        TextView title = (TextView) this.findViewById(R.id.title);
        title.setText("评价列表");
        presenter.initAdapter(this, this);
    }

    @Override
    public void initData() {
        if (!getIntent().getStringExtra(KEY_ROLEID).isEmpty()) {
            presenter.loadStoreEva(this, getIntent().getStringExtra(KEY_ROLEID));
        }
    }

    @Override
    public void showProgress() {
        super.showProgress($this);
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.fl_Left:
                finish();
                break;

        }
    }


    @Override
    public void initContainers(QuickAdapter evaluationAdapter) {
        listView.setAdapter(evaluationAdapter);

    }
}
